<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.sql.*" %>
<%@include file="chksiteuser.jsp"%>
<%@include file="../connstring.jsp" %>
<%
String strId = request.getParameter("id");
if(strId==null) strId="0";
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try{
	Class.forName(driver);
	conn=DriverManager.getConnection(url);
	stmt=conn.createStatement();
	String sql= "select * from areamanage where id="+strId;
	rs=stmt.executeQuery(sql);
	if(rs.next()){
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改数据</title>
<script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
</script>
<style type="text/css">
body td{
border-radius: 5px;
}</style>
</head>
<body>
	<h2>修改数据</h2>
	<form action="areaeditpost.jsp" method="post">
	<table width="100%" border="1" cellsapcing="0" cellpadding="10">
			<tr>
				<td width="100" align="right">收货人：</td>
				<td>
				<input type="text" name="us" value="<%= rs.getString("name")%>">
				</td>
			</tr>
			<tr>
				<td width="100" align="right">联系电话：</td>
				<td><input type="text" name="ph" value="<%= rs.getString("phone")%>">
				</td>
			</tr>
			<tr>
				<td width="100" align="right">具体地址：</td>
				<td><input type="text" name="ar" value="<%= rs.getString("area")%>">
				</td>
			</tr>
			<tr>
				<td width="100" align="right">类型：</td>
				<td><input type="text" name="ty" value="<%= rs.getString("types")%>">
				</td>
			</tr>
		</table>
		<hr/>
		<input type="hidden" name="id" value="<%= rs.getString("id")%>">
		<p><input type = "submit" value="保存"></p>	
	</form>
</body>
</html>
<%
	
	}else{
		response.sendRedirect("arealist.jsp");
	}
	
}catch(Exception ex){
out.println(ex.getMessage());
}finally{
	if(rs!=null) rs.close();
	if(stmt!=null) stmt.close();
	if(conn!=null) conn.close();
	
}
%>